Skip to content

Add standalone TypeScript interfaces for React migration (Phase 1)#165

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1771014524-migrate-types
Open

Add standalone TypeScript interfaces for React migration (Phase 1)#165
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1771014524-migrate-types

Conversation

@devin-ai-integration
Copy link

Add standalone TypeScript interfaces for React migration (Phase 1)

Summary

Converts Angular class-based models from src/app/shared/models/ into standalone TypeScript interfaces under a new src/types/ directory for use by the React app. This is Phase 1 of a multi-phase migration — only type definitions, no behavioral changes.

Types added: Story, Comment, User, PollResult, FeedType, Settings

All types are re-exported from src/types/index.ts as a barrel file.

No existing files were modified.

Review & Testing Checklist for Human

  • time_ago type inconsistency: Story.time_ago is number but Comment.time_ago is string. This matches the original Angular models, but verify against the actual HN API to confirm this is intentional and not a latent bug being carried forward.
  • User.crated_time typo: The field name crated_time is carried over from the original Angular model. Decide whether to fix it to created_time now (breaking change vs API shape) or leave it for a later PR.
  • No optional fields: All interface properties are required. Verify whether the HN API always returns every field (e.g., url, poll, domain may be absent on certain item types). Consider adding ? where appropriate before the React app consumes these types.

Notes

  • This PR is additive only (7 new files, 0 modified) — no risk to existing Angular app behavior.
  • Recommended test plan: run npx tsc --noEmit on the src/types/ files to confirm they compile cleanly.

Requested by: @eashansinha
Link to Devin run

Convert Angular classes from src/app/shared/models/ to TypeScript interfaces
in src/types/ for use by the React app (Phase 1 of migration).

Types added: Story, Comment, User, PollResult, FeedType, Settings

Co-Authored-By: Eashan Sinha <eashan.sinha@codeium.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants